import { AppData } from "./app";

export class Storage {
  static setSync<T>(key: string, value: T) {
    uni.setStorageSync(`${AppData.env}-${key}`, value);
  }

  static getSync<T>(key: string) {
    return uni.getStorageSync(`${AppData.env}-${key}`);
  }

  static deleteSync(key: string) {
    uni.removeStorageSync(`${AppData.env}-${key}`);
  }
}
